package com.kt.demo.service;

import com.kt.demo.dao.DataDictionaryMapper;
import com.kt.demo.pojo.DataDictionary;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Log4j2
@Service
public class DataDictionaryService implements DataDictionaryMapper {
    @Autowired
    private DataDictionaryMapper dataDictionaryMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public int insert(DataDictionary record) {
        return 0;
    }

    @Override
    public int insertSelective(DataDictionary record) {
        return 0;
    }

    @Override
    public DataDictionary selectByPrimaryKey(Long id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(DataDictionary record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(DataDictionary record) {
        return 0;
    }

    @Override
    public List<DataDictionary> getDataDictionaryList(String type_code) {
        List<DataDictionary> dataDictionaries = dataDictionaryMapper.getDataDictionaryList(type_code);
        try {
            if(null!=dataDictionaries){
                dataDictionaries=dataDictionaries;
            }else {
                dataDictionaries=null;
            }
        } catch (Exception e) {
            log.error(e.getMessage());
            e.printStackTrace();
        }
        return  dataDictionaries;
    }
}
